package com.yl.mybatis.session;


import java.io.IOException;
import java.io.InputStream;

public class SqlSessionFactoryBuilder {

    //变更后xml不可用
//    public SqlSessionFactory build(InputStream inputStream) throws IOException {
//        XmlConfiguration configuration = new XmlConfiguration();
//        configuration.setInputStream(inputStream);
//        configuration.loadConfigurations();
//        return new SqlSessionFactory(configuration);
//    }


    public SqlSessionFactory buildAnnotation() {
        Configuration configuration = new Configuration();
        configuration.loadConfigurations();
        return new SqlSessionFactory(configuration);
    }



}
